<?php 
/*<db>引用类
 * 
 * 
 */
include(APPLICATION_PATH.'\application\library\NotORM.php');
class mssql{
	private $host;
	private $username;
	private $password;
	private $database;
	private $handle;
	private function __construct (){
		$this -> host = '47.93.35.3,1433';
		$this -> username = 'sa';
		$this -> password = 'HWSp29qCGEAHBmfnah';
		$this -> database = 'qungbang';
		$this -> init();
	}
	
	public static function GetInstance() {
		try {
		$pdo = new PDO("sqlsrv:Server=47.93.35.3,1433;Database=test","sa","HWSp29qCGEAHBmfnah");
		} catch (PDOException $e) {
			echo"Failed to get DB handle: ".$e->getMessage() ."n";
			exit;
		}
		 $db = new NotORM($pdo);
		 return $db;
	}
}